The invention relates to a control circuit for controlling, supporting and monitoring a microcontroller, which control circuit is built up outside the microcontroller, which is resettable by means of the control circuit, and which control circuit includes a watchdog circuit.
Such a control circuit is disclosed in U.S. Pat. No. 5,203,000. Said control circuit and the microcontroller are separately built up on an integrated circuit. The control circuit carries out a kind of power management, particularly when the power supply voltage is on the way up or on the way down. In addition, the height of the power supply voltage is monitored. The control circuit is capable of resetting the microcontroller which is triggered manually through a control button. The control circuit further includes a watchdog circuit.
It is an object of the invention to further develop such a control circuit so that it can off-load the microcontroller from even more functions, and, in addition, the microcontroller can be operated in the inactive mode as often as possible, so as to save power.
In accordance with the invention, this object is achieved in that function signals are supplied to the control circuit, with which function signals presettable function modes of a device are associated, which device is controlled by said microcontroller, in that the control circuit supplies a read-request signal to the microcontroller when the function signals change, which read-request signal induces the microcontroller to evaluate the changed external signal and/or read the data associated with said signal, and in that the control circuit, in case the microcontroller is in an inactive state when the function signals change, supplies a reset signal to this microcontroller prior to supplying the read-request signal, which reset signal brings the microcontroller into an active state, and after supplying the reset signal, the control circuit activates the watchdog circuit.
The function signals supplied to the control circuit are linked to specific functions of the device which is controlled by the microcontroller. Consequently, if one of said functions is triggered, then the associated function signal undergoes a change. This is recognized by the control circuit and a read-request signal is supplied to the microcontroller by said control circuit, and, as a result, the microcontroller must read data assigned by the control circuit. These data may relate, for example, only to the signalling of the fact that a specific function signal has been triggered, however, it is also possible that associated data are transmitted. In this manner, the microcontroller is off-loaded from the continuous monitoring of the state of the function signals. In principle, any desired number of signals may be monitored by the control circuit. Only if one of the function signals changes, a corresponding signal is supplied to the microcontroller which must react to this. Consequently, the microcontroller does not have to continuously monitor the function signals, but becomes active only when one of the signals changes. As a result, computing time is saved or, also when the function signals are to be monitored, the microcontroller may be in the inactive mode.
Dependent upon the application and the device controlled by the microcontroller, said microcontroller does not have to be active continuously; on the contrary, it can be in an inactive state which may consist in that the microcontroller is in a kind of power-saving mode at a reduced clock frequency or that the power supply is completely switched off. The microcontroller can stay in this inactive state as long as none of the function signals changes. If, following a change of one of the function signals, the microcontroller must perform a corresponding function, said microcontroller is first converted to the active state by the control circuit. After said conversion by means of a reset signal, the control circuit supplies the above-explained read-request signal to the microcontroller. Subsequently, the proper functioning of the microcontroller is monitored by means of the watchdog circuit.
In this manner, it is achieved that the microcontroller can optionally stay in the inactive state when none of the function signals changes. As a result, a saving of energy is achieved.
Consequently, the functioning of the control circuit is governed by the fact whether the microcontroller is in the active or inactive state when one of the function signals changes, that is when the microcontroller is in the active state, the control circuit supplies only the read-request signal, and when the microcontroller is in the inactive state, the control circuit first supplies a reset signal and subsequently the read-request signal to the microcontroller.
In an advantageous embodiment of the invention in accordance with claim 2, the control circuit is used to activate the microcontroller of a car radio when specific functions of the car radio are triggered. Particularly for this application, it may be advantageous to put the microcontroller into the inactive, power-saving mode as long as none of the function signals changes. If, however, for example the operating part of the car radio is provided, then the microcontroller has to be activated, which is done through the control circuit. Also for monitoring traffic messages, time-controlled recordings of the traffic messages, or the like, the control circuit can be advantageously used.
The measures in accordance with the further embodiment as claimed in claim 3 ensure that after a reset signal has been given, such a signal is not repeated within a predetermined time period so as to first enable the microcontroller to start up.
It is possible that errors occur in the control circuit. For this purpose, in accordance with a further embodiment as claimed in claim 5, an internal monitoring of the clock signal of the control circuit is carried out. If this clock signal drops out, a corresponding error message is supplied to the microcontroller, thus reporting to the microcontroller that the control circuit does not function error free and that, as a result, its signals cannot be evaluated. In this case, it is possible that the microcontroller itself must monitor the function signals. As a result of this measure, it is precluded that a control circuit disturbance leads to a disturbance of the entire system, in particular of the function of the microcontroller.
A further embodiment of the invention as claimed in claim 6, can advantageously be used for time-controlled monitoring. By comparing the two values, for example, traffic announcements can be recorded in a time-controlled manner without it being necessary that the microcontroller is active in the period of time between recordings or that the microcontroller performs a time-monitoring function.
The measure in accordance with the embodiment of the invention as claimed in claim 7 can also be used to optically signal errors in the control circuit. Further, the intermittent signal in car radios during the inactive state of the microcontroller can be used as an external signal for theft protection.
By means of the measures as claimed in claim 8, theft protection can be achieved in that the control circuit records the variation in reference voltage and the duration of the outage of the reference voltage, or that the control circuit records the instant when the device is no longer at the reference voltage. This is then reported to the microcontroller, which can react in an appropriate manner, for example by blocking the functions of the device.
To monitor the height of the supply voltage of the device, use can advantageously be made of the measures claimed in claim 9 of the invention. Also in this case, the microcontroller is not responsible for the time-monitoring function.
To save energy, the control circuit may optionally be used, as claimed in claim 10, to switch off the power supply voltage of the microcontroller during the inactive phase. In this case, the supply voltage must be switched on again before delivery of the reset signal. By virtue thereof, a further saving in energy is achieved.
These and other aspects of the invention will be apparent from and elucidated with reference to the embodiment described hereinafter.